package com.ssh.dao.impl;

import org.springframework.stereotype.Repository;

import com.ssh.dao.BaseDao;
import com.ssh.dao.UserDao;
import com.ssh.entity.UserEntity;

@Repository
public class UserDaoImpl extends BaseDao implements UserDao{

	
	@Override
	public void addUser(UserEntity user) {
		/*Session session = sessionFactory.getCurrentSession();
		session.beginTransaction();
		
		UserEntity user = new UserEntity();
		user.setUsername("土狗");
		user.setPassword("12334455");
		
		session.save(user);
		System.out.println("user add success!");
		
		session.getTransaction().commit();*/
		try {
			getSession().save(user);
			
		} catch (Exception e) {
			// TODO: handle exception
		}
	}

}
